﻿using System;
using System.Text;

namespace Liang.UI.Enums
{

    /// <summary>
    /// 鼠标状态
    /// </summary>
    public enum EMouseState
    {
        /// <summary>
        /// 默认
        /// </summary>
        Normal,
        /// <summary>
        /// 鼠标划过
        /// </summary>
        Move,
        /// <summary>
        /// 鼠标按下
        /// </summary>
        Down,
        /// <summary>
        /// 鼠标释放
        /// </summary>
        Up,
        /// <summary>
        /// 鼠标离开
        /// </summary>
        Leave,
    }

    /// <summary>
    /// 定义了辅助键的名称
    /// </summary>
    [Flags]
    public enum KeyModifiers : int
    {
        /// <summary>
        /// 
        /// </summary>
        None = 0,
        /// <summary>
        /// 
        /// </summary>
        Alt = 1,
        /// <summary>
        /// 
        /// </summary>
        Ctrl = 2,
        /// <summary>
        /// 
        /// </summary>
        Shift = 4,
        /// <summary>
        /// 
        /// </summary>
        WindowsKey = 8
    }


    /// <summary>
    /// 发送到一个窗口，以确定鼠标在窗口的哪一部分，对应于一个特定的屏幕坐标
    /// </summary>
    public enum WM_NCHITTEST : int
    {
        /// <summary>
        /// 在屏幕背景或窗口之间的分界线
        /// </summary>
        HTERROR = -2,
        /// <summary>
        /// 在目前一个窗口，其他窗口覆盖在同一个线程
        /// （该消息将被发送到相关窗口在同一个线程，直到其中一个返回一个代码，是不是HTTRANSPARENT）
        /// </summary>
        HTTRANSPARENT = -1,
        /// <summary>
        /// 在屏幕背景或窗口之间的分界线上
        /// </summary>
        HTNOWHERE = 0,
        /// <summary>
        /// 在客户端区域
        /// </summary>
        HTCLIENT = 1,
        /// <summary>
        /// 在标题栏
        /// </summary>
        HTCAPTION = 2,
        /// <summary>
        /// 在窗口菜单中，或在一个子窗口的关闭按钮
        /// </summary>
        HTSYSMENU = 3,
        /// <summary>
        /// 在大小框（与HTGROWBO相同）
        /// </summary>
        HTSIZE = 4,
        /// <summary>
        /// 在大小框（与HTSIZE相同）
        /// </summary>
        HTGROWBOX = 4,
        /// <summary>
        /// 在一个菜单
        /// </summary>
        HTMENU = 5,
        /// <summary>
        /// 在水平滚动条
        /// </summary>
        HTHSCROLL = 6,
        /// <summary>
        /// 在垂直滚动条
        /// </summary>
        HTVSCROLL = 7,
        /// <summary>
        /// 在最小化按钮
        /// </summary>
        HTREDUCE = 8,
        /// <summary>
        /// 在最小化按钮
        /// </summary>
        HTMINBUTTON = 8,
        /// <summary>
        /// 在最大化按钮
        /// </summary>
        HTMAXBUTTON = 9,
        /// <summary>
        /// 在最大化按钮
        /// </summary>
        HTZOOM = 9,
        /// <summary>
        /// 在左边框可调整大小的窗口
        /// </summary>
        HTLEFT = 10,
        /// <summary>
        /// 在一个可调整大小的窗口的右边框
        /// </summary>
        HTRIGHT = 11,
        /// <summary>
        /// 在窗口的上边框水平线上
        /// </summary>
        HTTOP = 12,
        /// <summary>
        /// 在窗口的左上边框
        /// </summary>
        HTTOPLEFT = 13,
        /// <summary>
        /// 在窗口的右上边框
        /// </summary>
        HTTOPRIGHT = 14,
        /// <summary>
        /// （用户可以在较低的水平边界可调整大小的窗口单击鼠标，改变窗口的垂直大小）
        /// </summary>
        HTBOTTOM = 15,
        /// <summary>
        /// 在左下角的边框可调整大小的窗口（用户可以通过点击鼠标来调整窗口的大小，对角）
        /// </summary>
        HTBOTTOMLEFT = 16,
        /// <summary>
        /// 在右下角的边框可调整大小的窗口（用户可以通过点击鼠标来调整窗口的大小，对角）
        /// </summary>
        HTBOTTOMRIGHT = 17,
        /// <summary>
        /// 在一个不具有缩放边框的窗口
        /// </summary>
        HTBORDER = 18,
        /// <summary>
        /// 在关闭按钮
        /// </summary>
        HTCLOSE = 20,
        /// <summary>
        /// 在帮助按钮
        /// </summary>
        HTHELP = 21,
    }

    /// <summary>
    /// 挂钩处理过程的类型
    /// </summary>
    public enum HookType
    {
        /// <summary>
        /// 安装一个挂钩处理过程, 以监视由对话框、消息框、菜单条、或滚动条中的输入事件引发的消息
        /// </summary>
        WH_MSGFILTER = -1,
        /// <summary>
        /// 安装一个挂钩处理过程,对寄送至系统消息队列的输入消息进行纪录
        /// </summary>
        WH_JOURNALRECORD = 0,
        /// <summary>
        /// 安装一个挂钩处理过程,对此前由WH_JOURNALRECORD 挂钩处理过程纪录的消息进行寄送
        /// </summary>
        WH_JOURNALPLAYBACK = 1,
        /// <summary>
        /// 安装一个挂钩处理过程对击键消息进行监视
        /// </summary>
        WH_KEYBORARD = 2,
        /// <summary>
        /// 安装一个挂钩处理过程对寄送至消息队列的消息进行监视
        /// </summary>
        WH_GETMESSAGE = 3,
        /// <summary>
        /// 安装一个挂钩处理过程,在系统将消息发送至目标窗口处理过程之前,对该消息进行监视
        /// </summary>
        WH_CALLWNDPROC = 4,
        /// <summary>
        /// 安装一个挂钩处理过程,接受对CBT应用程序有用的消息
        /// </summary>
        WH_CBT = 5,
        /// <summary>
        /// <para>安装一个挂钩处理过程,以监视由对话框、消息框、菜单条、或滚动条中</para>
        /// <para>的输入事件引发的消息.这个挂钩处理过程对系统中所有应用程序的这类</para>
        /// <para>消息都进行监视</para>
        /// </summary>
        WH_SYSMSGFILTER = 6,
        /// <summary>
        /// 安装一个挂钩处理过程,对鼠标消息进行监视
        /// </summary>
        WH_MOUSE = 7,
        /// <summary>
        /// 安装一个挂钩处理过程以便对其他挂钩处理过程进行调试
        /// </summary>
        WH_DEBUG = 9,
        /// <summary>
        /// 安装一个挂钩处理过程以接受对外壳应用程序有用的通知
        /// </summary>
        WH_SHELL = 10,
        /// <summary>
        /// <para>安装一个挂钩处理过程,该挂钩处理过程当应用程序的前台线程即将</para>
        /// <para>进入空闲状态时被调用,它有助于在空闲时间内执行低优先级的任务</para>
        /// </summary>
        WH_FOREGROUNDIDLE = 11,
        /// <summary>
        /// 安装一个挂钩处理过程,它对已被目标窗口处理过程处理过了的消息进行监视
        /// </summary>
        WH_CALLWNDPROCRET = 12,
        /// <summary>
        /// 此挂钩只能在Windows NT中被安装,用来对底层的键盘输入事件进行监视
        /// </summary>
        WH_KEYBORARD_LL = 13,
        /// <summary>
        /// 此挂钩只能在Windows NT中被安装,用来对底层的鼠标输入事件进行监视
        /// </summary>
        WH_MOUSE_LL = 14,
    }



    /// <summary>
    /// Windows 窗口样式
    /// </summary>
    [Flags]
    public enum WindowStyle : int
    {
        /// <summary>
        /// 
        /// </summary>
        WS_OVERLAPPED = 0x00000000,
        /// <summary>
        /// 
        /// </summary>
        WS_POPUP = unchecked((int)0x80000000),
        /// <summary>
        /// 
        /// </summary>
        WS_CHILD = 0x40000000,
        /// <summary>
        /// 
        /// </summary>
        WS_MINIMIZE = 0x20000000,
        /// <summary>
        /// 
        /// </summary>
        WS_VISIBLE = 0x10000000,
        /// <summary>
        /// 
        /// </summary>
        WS_DISABLED = 0x08000000,
        /// <summary>
        /// 
        /// </summary>
        WS_CLIPSIBLINGS = 0x04000000,
        /// <summary>
        /// 
        /// </summary>
        WS_CLIPCHILDREN = 0x02000000,
        /// <summary>
        /// 
        /// </summary>
        WS_MAXIMIZE = 0x01000000,
        /// <summary>
        /// 
        /// </summary>
        WS_CAPTION = 0x00C00000,
        /// <summary>
        /// 
        /// </summary>
        WS_BORDER = 0x00800000,
        /// <summary>
        /// 
        /// </summary>
        WS_DLGFRAME = 0x00400000,
        /// <summary>
        /// 
        /// </summary>
        WS_VSCROLL = 0x00200000,
        /// <summary>
        /// 
        /// </summary>
        WS_HSCROLL = 0x00100000,
        /// <summary>
        /// 
        /// </summary>
        WS_SYSMENU = 0x00080000,
        /// <summary>
        /// 
        /// </summary>
        WS_THICKFRAME = 0x00040000,
        /// <summary>
        /// 
        /// </summary>
        WS_GROUP = 0x00020000,
        /// <summary>
        /// 
        /// </summary>
        WS_TABSTOP = 0x00010000,
        /// <summary>
        /// 
        /// </summary>
        WS_MINIMIZEBOX = 0x00020000,
        /// <summary>
        /// 
        /// </summary>
        WS_MAXIMIZEBOX = 0x00010000,
        /// <summary>
        /// 
        /// </summary>
        WS_TILED = WS_OVERLAPPED,
        /// <summary>
        /// 
        /// </summary>
        WS_ICONIC = WS_MINIMIZE,
        /// <summary>
        /// 
        /// </summary>
        WS_SIZEBOX = WS_THICKFRAME,
        /// <summary>
        /// 
        /// </summary>
        WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW,
        /// <summary>
        /// 
        /// </summary>
        WS_OVERLAPPEDWINDOW = (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU |
                                WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX),
        /// <summary>
        /// 
        /// </summary>
        WS_POPUPWINDOW = (WS_POPUP | WS_BORDER | WS_SYSMENU),
        /// <summary>
        /// 
        /// </summary>
        WS_CHILDWINDOW = (WS_CHILD)
    }

    public enum ControlState
    {
        /// <summary>
        /// 正常状态
        /// </summary>
        Normal = 0,
        /// <summary>
        ///  /鼠标进入
        /// </summary>
        Highlight = 1,
        /// <summary>
        /// 鼠标按下
        /// </summary>
        Down = 2,
        /// <summary>
        /// 获得焦点
        /// </summary>
        Focus = 3,
        /// <summary>
        /// 控件禁止
        /// </summary>
        Disabled = 4
    }


    /// <summary>
    /// 系统控制按钮
    /// </summary>
    public enum ESysButton
    {
        /// <summary>
        /// 默认-最小化，最大化，关闭
        /// </summary>
        Normal,
        /// <summary>
        /// 关闭按钮
        /// </summary>
        Close,
        /// <summary>
        /// 关闭按钮，最小化
        /// </summary>
        Close_Mini,
    }

    public enum SystemButtonState
    {
        Normal,
        HighLight,
        Down,
        DownLeave
    }
    /// <summary>
    /// 查询控件运算符值
    /// </summary>
    public enum QueryExpressionEnum
    {
        LK = 0,
        EQ = 1,
        IN = 2,
        YEARANDMONTH = 3,
        FR = 4,
        TO = 5,
        UE = 6,
        GT = 7,
        LT = 8,
        NOTNULL = 9,
        ISNULL = 10,
        OR = 11,
        SK = 8
    }

    /// <summary>
    /// 查询控件使用方式
    /// </summary>
    public enum UsingTypeEnum
    {
        Query = 0,
        Edit = 1,
        Normal = 2,
        Join = 3
    }

    /// <summary>
    /// 消息框MessageBox 上按钮枚举
    /// </summary>
    public enum MessageBoxButtonsEx
    {
        /// <summary>
        /// 消息框包含“确定”按钮
        /// </summary>
        OK,
        /// <summary>
        /// 消息框包含“确定”与“取消”按钮
        /// </summary>
        OKCancel,
        /// <summary>
        /// 消息框包含“重试”与“取消”按钮
        /// </summary>
        RetryCancel
    }

    /// <summary>
    /// MessageBox icon图标枚举
    /// </summary>
    public enum MessageBoxIconEx
    {
        Error,
        Information,
        OK,
        Question,
        Warning
    }
}
